package com.zsrt.java.day20161226.xww.demo3.demo6;

import java.util.Scanner;

public class Counter {

	public static void demo6(int a,String b,int c){
		switch (b) {
		case "+":System.out.println(a+c);break;
		case "-":System.out.println(a-c);break;
		case "*":System.out.println(a*c);break;
		case "/":System.out.println(a/c);break;
		case "%":System.out.println(a%c);break;
		default:break;
	}
	}
	public static void main(String[] args) {
		
		Scanner sc=new Scanner(System.in);
		System.out.println("请输入第一个数字:");
		int a =sc.nextInt();
		System.out.println("请输入一个符号如+-*/%");
		String b =sc.next();
		System.out.println("请输入第二个数字:");
		int c =sc.nextInt();
		demo6(a,b,c);
		sc.close();
	}
}
